package com.jiedeng.dao;

import com.jiedeng.model.Event;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author 覃远龙
 * @ClassName: IEventRepository
 * @Description:
 * @date 2017/8/4 11:04
 */
public interface IEventRepository extends JpaRepository<Event, String> {

    List<Event> findAll(Specification<Event> specification, Sort sort);

    long countByProjectId(long projectId);

    long countByEventPersonId(long personId);

    List<Event> findByEventPersonId(long personId);

}
